package com.atguigu.lease.common.exception;

import com.atguigu.lease.common.result.ResultCodeEnum;
import lombok.Data;

/**
 * @author cxt
 * &#064;Description
 * &#064;create 2025/3/17 上午10:15
 */
@Data
public class leaseException extends RuntimeException {
    private Integer code ;

    public leaseException(Integer code, String message) {
        super(message);
        this.code = code;
    }
    public leaseException(ResultCodeEnum resultCodeEnum) {
        super(resultCodeEnum.getMessage());
        this.code = resultCodeEnum.getCode();
    }
}
